#include <stdlib.h>
#include <stdio.h>
struct A{
    int *ptr;
}A;
int main() {
    struct A* a=(struct A*)malloc(sizeof(struct A));
    a->ptr = malloc(sizeof(int)*3);
    a->ptr[0] = 100;
    a->ptr[1] = 200;
    a->ptr[2] = 300;

    int *p = a->ptr;

    printf("%d\n",*(p+0));
    printf("%d\n",*(p+1));
    printf("%d\n",*(p+2));
    printf("%d",*(p+3));
    return 0;
}   